<?php 
class info_pageant extends Model
{
	static function getTableName() 
	{
		return 'info_pageant';
	}
	
	function set($object)
	{
		$this->episode_id = !isset($object->episode_id) ? '0' : $object->episode_id;
		$this->name_chinese = !isset($object->name_chinese) ? '' : trim($object->name_chinese);
		$this->name_english = !isset($object->name_english) ? '' : trim($object->name_english);
		$this->nickname = !isset($object->nickname) ? '' : trim($object->nickname);
		$this->pageant_no = empty($object->pageant_no) ? '' : $object->pageant_no;
		$this->gender = !isset($object->gender) ? '0' : $object->gender;
		$this->date_of_birth_year = !isset($object->date_of_birth_year) ? '0' : $object->date_of_birth_year;
		$this->date_of_birth_month = !isset($object->date_of_birth_month) ? '0' : $object->date_of_birth_month;
		$this->date_of_birth_day = !isset($object->date_of_birth_day) ? '0' : $object->date_of_birth_day;
		$this->origin_country = !isset($object->origin_country) ? '0' : $object->origin_country;
		$this->origin_province_state_prefecture = !isset($object->origin_province_state_prefecture) ? '0' 
												  : $object->origin_province_state_prefecture;
		$this->origin_city = !isset($object->origin_city) ? '' : trim($object->origin_city);
		$this->astrology = !isset($object->astrology) ? '' : $object->astrology;
		$this->zodiac = !isset($object->zodiac) ? '' : $object->zodiac;
		$this->occupation = !isset($object->occupation) ? '' : trim($object->occupation);
		$this->education = !isset($object->education) ? '' : trim($object->education);
		$this->height = !isset($object->height) ? '' : trim($object->height);
		$this->weight = !isset($object->weight) ? '' : trim($object->weight);
		$this->measurements = !isset($object->measurements) ? '' : trim($object->measurements);
		$this->aspiration = !isset($object->aspiration) ? '' : trim($object->aspiration);
		$this->characters = !isset($object->characters) ? '' : trim($object->characters);
		$this->language_spoken = !isset($object->language_spoken) ? '' : trim($object->language_spoken);
		$this->hobbies = !isset($object->hobbies) ? '' : trim($object->hobbies);
		$this->talent = !isset($object->talent) ? '' : trim($object->talent);
		$this->description = !isset($object->description) ? '' : $object->description;
		$this->remark = !isset($object->remark) ? '' : $object->remark;
        $this->publish_datetime = !isset($object->publish_datetime) ? '' : $object->publish_datetime;
        $this->expire_datetime =  !isset($object->expire_datetime) ? '' : $object->expire_datetime;
		$this->status = !isset($object->status) ? '0' : $object->status;
		$this->created_by = !isset($object->created_by) ? '' : $object->created_by;
		$this->created_at = !isset($object->created_at) ? '' : $object->created_at;
		$this->modified_by = !isset($object->modified_by) ? '' : $object->modified_by;
		$this->modified_at = !isset($object->modified_at) ? '' : $object->modified_at;
	}
}
?>
